package com.huaxin.hxmoduleworkorder.dto.request;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.huaxin.hxmoduleworkorder.common.annotation.validation.ValidCustomerType;
import com.huaxin.hxmoduleworkorder.common.annotation.validation.ValidInspectionOrderStatus;
import com.huaxin.hxmoduleworkorder.dto.request.base.basePageReqDTO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

@EqualsAndHashCode(callSuper = true)
@Data

public class InspectionOrderPageListReqDTO extends basePageReqDTO {
    @Schema(description = "标题", example = "检查工单")
    private String title;

    @Schema(description = "工单状态：published（发布）/in_progress（进行中）/completed（已完成）/cancelled（取消）", example = "published")
    @ValidInspectionOrderStatus
    private String status;

    @Schema(description = "指定电工ID，用于筛选指定电工的工单", example = "e1001")
    private String assignedElectricianId;

    @Schema(description = "客户类型：commercial/residential", example = "commercial")
    @ValidCustomerType
    private String customerType;

    @Schema(description = "指定客户ID，用于筛选指定客户的工单", example = "c1001")
    private String customerId;

    @Schema(description = "指定配电房ID，用于筛选指定配电房的工单", example = "r1001")
    private String roomId;

    @Schema(description = "指定配电柜ID，用于筛选指定配电柜的工单", example = "c1001")
    private String cabinetId;

    @Schema(description = "执行开始时间（可联系客户）", example = "2025-09-02T08:00:00")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime executeStartTime;

    @Schema(description = "执行截止时间（必须完成）", example = "2025-09-05T18:00:00")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime executeEndTime;
}
